<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link type="text/css" rel="stylesheet" href="css/style.css" />
	<script src="js/axios.min.js"></script>
	<script src="js/vue.min.js"></script>
	<script src="js/vote.js"></script>
	<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
	<script src="https://unpkg.com/element-ui/lib/index.js"></script>
</head>
<body>
<div id="app">
	<div id="header" class="wrap">
		<img src="images/logo.gif" />
	</div>
	<div id="login" class="wrap">
		<div class="main">
			<div class="corner"></div>
			<div class="introduce">
				<h2>源辰信息</h2>
				<p>网上调查系统...</p>
			</div>
			<div class="login">
				<h2>用户登录</h2>
				<form method="post" action="#">
					<dl id="loginBox">
						<dt>用户名：</dt>
						<dd><input type="text" class="input-text" v-model="user.uname"  value=""/></dd>
						<dt>密　码：</dt>
						<dd><input type="password" class="input-text" v-model="user.pwd" value=""/></dd>
						<dt></dt>
						<dd><input type="submit" class="input-button" @click.prevent="login" value="登录" /> <a href="register.html">新用户注册</a></dd>
					</dl>
				</form>
				<div class="error"></div>
			</div>
		</div>
	</div>
	<div class="wrap">
	</div>
	<myfooter></myfooter>
</div>
<script>
	var v = new Vue({
		el :"#app",
		data : {
			user:{
				uname : "",
				pwd : ""
			}
		},
		methods:{
			login(){
				let params = buildParams(this.user);
				axios.post("user/login.s", params).then(res=>{
					result(res, this, ()=>{
						location.href = "index.html";
					});
				});
			}
		}
	})
</script>
</body>
</html>
